local skill = fk.CreateSkill {
  name = "lvshi__duxue",
}

Fk:loadTranslationTable{
  ["lvshi__duxue"] = "笃学",
  [":lvshi__duxue"] = "若你的手牌数小于体力值，你可将【杀】当【无中生有】使用。",
  ["$lvshi__duxue1"] = "手不释卷，学而广益。",
  ["$lvshi__duxue2"] = "治经勤学，别三日而刮目相看。",
}

skill:addEffect("viewas", {
  pattern = "ex_nihilo",
  enabled_at_play = function(self, player)
    return player:getHandcardNum() < player.hp
  end,
  card_filter = function(self, player, to_select, selected)
    return Fk:getCardById(to_select).trueName == "slash"
  end,
  view_as = function(self, player, cards)
    if #cards ~= 1 then return end
    local card = Fk:cloneCard("ex_nihilo")
    card:addSubcards(cards)
    card.skillName = skill.name
    return card
  end,
})

return skill